<template>
  <div id="app">
    <div class="main-container">
      <router-view/>
    </div>
    <footer class="footer" v-if="showflag">
      <ul class="footer-nav wid">
        <li>
          <div class="nav-list">
            <router-link tag="div" to="/" class="item" >
              <div class="icon-box">
                <svg class="icon" aria-hidden="true">
                    <use xlink:href="#icon-WMS"></use>
                </svg>
              </div>
              <p>首页</p>
            </router-link>
             <div class="item">
              <div class="icon-box">
                 <svg class="icon" aria-hidden="true">
                    <use xlink:href="#icon-xiangmuguanli"></use>
                </svg>
              </div>
              <p>资讯</p>
            </div>
          </div>
        </li>
        <div class="sao-icon img-box">
            <img src="./assets/images/footer-sao.png" alt="" srcset="">
        </div>
        <li>

              <div class="nav-list">
            <div class="item ">
              <div class="icon-box">
                 <svg class="icon" aria-hidden="true">
                    <use xlink:href="#icon-xiaoxi"></use>
                </svg>
              </div>
              <p>客服</p>
            </div>
             <router-link tag="div" to="/user" class="item" >
              <div class="icon-box">
                 <svg class="icon" aria-hidden="true">
                    <use xlink:href="#icon-hebingqianhe"></use>
                </svg>
              </div >
              <p>用户</p>
            </router-link>
          </div>
        </li>

      </ul>
    </footer>
  </div>
</template>

<script>
import { constants } from 'fs'
export default {
  data(){
    return {
      showflag:true
    }
  },
  watch:{
      $route(to,from){
	  	 this.conflag()
      }
  },
  created(){

  },
  methods:{
    conflag(){
      let router = this.$route.path
        if( router === '/login'){
          this.showflag=false
        }else{
          this.showflag=true
        }
    }
  
  }
}
</script>

<style lang="scss">

</style>
